import { request } from '../util/request'
import {module, menu} from './mock-data'

export const indexApi = {
  updatePasswd: (body) => request('/password?t=' + (new Date().getTime()), body, 'put'),
  logOut: (query) => request('/logout?t=' + (new Date().getTime()), query, 'delete'),
  getNavs: function () {
    return new Promise((resolve, reject) => {
      resolve(module)
    })
  },
  getMenusByModule: function () {
    return new Promise((resolve, reject) => {
      resolve(menu)
    })
  }

}
